$.fn.component = function (options) {

    // 事件
    if (options.on) {
        var _eventsLength = options.on.length
        for (var _i = 0; _i < _eventsLength; _i++) {
            this.on(options.on[_i].events, options.on[_i].selector, options.on[_i].data, options.on[_i].handler)
        }
    }

    // 方法
    if (options.methods) {
        for (var _p in options.methods) {
            this[_p] = options.methods[_p]
        }
    }

    return this
}